package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.SupplierManage;
import com.sc.nft.entity.dto.SupplierManagePageDTO;
import com.sc.nft.entity.dto.SupplierManagePageVO;
import com.sc.nft.mapper.SupplierManageMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 供应商管理(SupplierManage)表Dao层
 *
 * @author 王伟成
 * @since 2023-10-17 15:29:38
 */
@Slf4j
@Repository
public class SupplierManageDao extends ServiceImpl<SupplierManageMapper, SupplierManage> {

    public IPage<SupplierManagePageVO> page(SupplierManagePageDTO supplierManagePageDTO) {
        return baseMapper.page(supplierManagePageDTO.toMp(), supplierManagePageDTO);
    }

    public SupplierManagePageVO getById(Long id) {
        return baseMapper.getById(id);
    }

    public SupplierManage get(Long id){
        return baseMapper.selectById(id);
    }

    public List<SupplierManagePageVO> listOverride() {
        return baseMapper.listOverride();
    }

}
